package com.example.view_count.service.impl;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.view_count.entity.ViewCountDO;
import com.example.view_count.mapper.ViewCountMapper;
import com.example.view_count.service.ViewCountService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tc
 * @since 2023-03-06
 */
@Service
public class ViewCountServiceImpl extends ServiceImpl<ViewCountMapper, ViewCountDO> implements ViewCountService {
        @Override
        public Integer queryViewCount() {
                int viewCount = baseMapper.selectList(null).get(0).getViewcount();
                return viewCount;
        }
}
